﻿#include <iostream>
#include <vector>
#include <windows.h>
#include "../ast_to_json.hpp"

int main(int, const char **)
{
    cyclone::parser::AstToJson cycParser;
    // std::cout<< cycParser.parse("if(num1 > num2 ){ for ( let count  = 0 ; count < dateTime.toString().split('year',1)[1].toNumber() + 5/2; ++ count ){ str1['b']; person.name; fool = date.year + date['month'][1]; }  }; let a");
    SetConsoleOutputCP(65001);
    SetConsoleOutputCP(CP_UTF8);
    std::cout << u8"学生.名字";
    const auto theExpr = u8"学生.名字=\"小李\"";
    std::cout << cycParser.parse(theExpr);
    std::cout << cycParser.parse("(a ) => a + 1");
    std::cout << cycParser.parse("let a  = 10");
    return 0;
}

